pp108 : Creating a Plug-in for a Content Management System

Creating a Plug-in for a Content Management System

This topic describes the procedure creating a Content Management System plug-in to be used with Process Platform.


Process Platform is capable of working with any Content Management System (CMS). Process Platform can work with CMS(s) that are JSR 170 compliant and ones that are not JSR 170 compliant too. Jackrabbit is a JSR 170 compliant CMS and Process Platform provides a plug-in that acts as a client of Jackrabbit for storing documents. While installing Process Platform, Process Platform repository is configured as the default CMS. It is recommended to use Jackrabbit instead of Process Platform repository in your application. There may be a CMS that is already existing or you may be planning to use one. In such cases, you can create a plug-in that can be used with Process Platform to connect to the CMS. If you need to create a plug-in for a CMS that does not comply with JSR 170 standards, you can implement the IDocumentStore interface.

To create a Plug-in for a JSR 170 compliant CMS, do the following:
  1. Extend the JSRDocumentStoreClient class. For example, in Jackrabbit implementation, we extended the JSRDocumentStoreClient class to get JackRabbitClient class.
  2. The methods you must override are given in the Method name column and the output expected out of these methods are described in the Expection column:

    Method name

    Expectation

    getRepository(String url)

    The purpose of this method is to create the Repository object based on the CMS specification. URL of the repository is passed as the parameter for this method and it must return a JSR 170 compliant Repository object. For example,repository = (Repository) new URLRemoteRepository(this.repositoryURL);

    getSession(Repository repository)

    This method is used for creating a session for an user.Repositoryobject is passed as the parameter for this method and it returns theSessionobject. For example,getSession() : session = this.repository.login(new SimpleCredentials(this.userName, this.password.toCharArray()));


    The plug-in for a JSR 170 compliant CMS is created.
To create a Plug-in for a CMS that does not comply with JSR 170 standards, do the following:
  1. Implement the IDocumentStore interface. This interface contains the following methods and it is expected that the each of these methods is implemented to give the output that is described in the Expectation column:

    Method Name

    Expectation

    initializeStore

    Implement theinitializeStoremethod which is part of theIDocumentStoreinterface. TheStoreConfigurationobject is passed as the parameter for this method and this initializes the repository settings. TheStoreConfigurationobject contains a method calledgetExtConfigXML. This method is used for retrieving the XML content that is provided in the External Configuration XML field while creating the Service Container for this repository. For more information Service Containers, refer to Managing Service Containers.

    CreateDocument

    This method is expected to create documents.

    DeleteDocument

    This method is expected to delete documents.

    GetDocument

    This method if expected to fetch the details of a document.

    GetDocumentsInfo

    This method is also expected to fetch the details of a document. If the name of a folder is passed, the method is expected to fetch the details of the collection of files in the folder. If the name of a file is passed, the method is expected to fetch the details of the file.

    UpdateDocument

    This method is expected to update an existing document.

A plug-in for a CMS that does not comply with JSR 170 standards is created.

A new plug-in to work with the repository is created.